<template>
	<view class="">
		<stop isBack>
			<view slot="content">物资信息</view>
		</stop>
		<view class="lh2 bcf pad2 bdtso">
			<view class="list-style-2 flrc">
				<view class="flex1">基本信息</view>
			</view>
			<stext v-model="en.name" label="名称" placeholder="请填写物资名称"></stext>
			<stext v-model="en.code" label="物资编号" placeholder="不可重复"></stext>
			<stext v-model="en.model" label="规格型号" placeholder="请填写规格型号"></stext>
			<stext v-model="en.price" label="参考价值" placeholder="单位:元"></stext>
			<stext v-model="en.min" label="库存下限" placeholder="库存下限"></stext>
			<stext v-model="en.max" label="库存上限" placeholder="库存上限"></stext>
			<stext v-model="en.expireDay" label="有效期" placeholder="单位:天"></stext>
			<sentity v-model="en.category" label="物资类型" model="StoreCategory" placeholder="请选择"></sentity>
			<sentity v-model="en.unit" label="单位" model="StoreUnit" placeholder="请选择"></sentity>
			<sentity v-model="en.supplier" label="供应商" model="MachineSupplier" placeholder="请选择"></sentity>
			<sentity v-model="en.agent" label="代理商" model="MachineAgent" placeholder="请选择"></sentity>
			<spic class="bdtso" v-model="en.pic" label="主图" placeholder=""></spic>
			<spics class="bdtso" v-model="en.pics" label="附件" placeholder=""></spics>
			<view class="mart10">
				<ssubmit v-model="en" model="storeItems"></ssubmit>
			</view>
		</view>
		
		
		<!-- <loading :loading="myIsLoading"></loading> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:"",
				en:{
					agent: null,
					category: null,
					code: null,
					expireDay: null,
					id: null,
					logs: [],
					max: null,
					min: null,
					model: null,
					name: null,
					pic: null,
					pics: [],
					price: null,
					supplier: null,
					tips: null,
					unit: null
				}
			}
		},
		methods: {
		},
		onLoad(option) {
			this.clearLoading()
			this.id = option.id
			this.$api.res('store_items',this.id,res=>{
				this.en = res
			})
		},
		watch:{
			nums(va){
				this.log(va)
			}
		}
	}
</script>

<style>

</style>
